﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;

namespace Elderos.AI
{
    public class TrainItem<TAdditionalInfo> 
        where TAdditionalInfo : class 
    {
        public double[] Inputs { get; set; }
        public double Output { get; set; }
        public TAdditionalInfo AdditionalInfo { get; set; }

        public override string ToString()
        {
            string addInfo = "";
            if (AdditionalInfo != null)
                addInfo = AdditionalInfo.ToString();
            return addInfo + "\t" + Output.ToString(CultureInfo.InvariantCulture) + "\t" +
                   string.Join("\t", Inputs.Select(x => x.ToString(CultureInfo.InvariantCulture)));
        }
    }
}
